import React, { Component } from 'react'

import Item from '../Item'
import './index.css'
export default class index extends Component {
    // static propTypes = {
    //     addTodo: PropTypes.func.isRequired
    // }
    render() {
        const { todos, changeCheck, deleteTodo } = this.props
        return (
            <ul className="todo-main">
                {
                    todos.map((current) => {
                        return <Item key={current.id} {...current} changeCheck={changeCheck} deleteTodo={deleteTodo} />
                    })
                }
            </ul>
        )
    }
}
